﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using Model;

namespace AirlinePilotAcedemy_WEB
{
    public partial class Kardex : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!User.Identity.IsAuthenticated)
                {
                    FormsAuthentication.RedirectToLoginPage();
                }
                User user = UserDataAccess.GetUserByUsername(User.Identity.Name);
                GridView1.DataSource = InscriptionDataAccess.GetKardex(user.Ci);
                GridView1.DataBind();
            }

        }
    }
}